#ifndef _HCC_ERROR_CODE_APP_UART_DISP_H_
#define _HCC_ERROR_CODE_APP_UART_DISP_H_

#include "ofc/ofc_types.h"
#include "hcc/hcc_error_code.h"
#include "hcc/hcc_error_code_app.h"

#ifdef __cplusplus
extern "C" {
#endif

// 不含行号的错误码生成
#define HCC_MAKE_APP_UART_DISP_ERROR(error_code) (int)HCC_MAKE_APP_ERROR(kHccAppUartDisp, error_code, HCC_ERROR_LEVEL_ERROR)
// 含行号的错误码生成
#define HCC_MAKE_APP_UART_DISP_ERROR_LINE(error_code) (int)HCC_ERROR(HCC_MAKE_APP_ERROR(kHccAppUartDisp, error_code, HCC_ERROR_LEVEL_ERROR))


/**
 * 串口分发:
 */
enum THccAppUartDispErrorCodeTag
{
	kHccAppUartDispSuccess	=	HCC_ERROR_SUCCESS,			///< 成功,没有错误
	kHccAppUartDispInvalidParam	=	HCC_MAKE_APP_UART_DISP_ERROR(1),			///<无效的参数
	kHccAppUartDispInitFail	=	HCC_MAKE_APP_UART_DISP_ERROR(2),			///<初始化失败
	kHccAppUartDispInitEventFail	=	HCC_MAKE_APP_UART_DISP_ERROR(3),			///<事件初始化失败
	kHccAppUartDispInitMutexFail	=	HCC_MAKE_APP_UART_DISP_ERROR(4),			///<互斥锁初始化失败
	kHccAppUartDispOpenDrvFail	=	HCC_MAKE_APP_UART_DISP_ERROR(5),			///<打开驱动失败
	kHccAppUartDispStartTaskFail	=	HCC_MAKE_APP_UART_DISP_ERROR(6),			///<线程无法启动
	kHccAppUartDispNotSupport	=	HCC_MAKE_APP_UART_DISP_ERROR(7),			///<功能不支持
	kHccAppUartDispNotOpen	=	HCC_MAKE_APP_UART_DISP_ERROR(8),			///<串口未打开
	kHccAppUartDispNvsBaud	=	HCC_MAKE_APP_UART_DISP_ERROR(9),			///<波特率获取失败
	kHccAppUartDispNvsParity	=	HCC_MAKE_APP_UART_DISP_ERROR(10),			///<校验位获取失败
	kHccAppUartDispNvsDispMax	=	HCC_MAKE_APP_UART_DISP_ERROR(11),			///<分发对象已满
};
typedef enum THccAppUartDispErrorCodeTag THccAppUartDispErrorCode;


typedef Int32 THccAppUartDispErrorCodeLine;
#define kHccAppUartDispSuccessLine	HCC_ERROR_SUCCESS	///< 成功,没有错误
#define kHccAppUartDispInvalidParamLine	HCC_MAKE_APP_UART_DISP_ERROR_LINE(1)	///<无效的参数
#define kHccAppUartDispInitFailLine	HCC_MAKE_APP_UART_DISP_ERROR_LINE(2)	///<初始化失败
#define kHccAppUartDispInitEventFailLine	HCC_MAKE_APP_UART_DISP_ERROR_LINE(3)	///<事件初始化失败
#define kHccAppUartDispInitMutexFailLine	HCC_MAKE_APP_UART_DISP_ERROR_LINE(4)	///<互斥锁初始化失败
#define kHccAppUartDispOpenDrvFailLine	HCC_MAKE_APP_UART_DISP_ERROR_LINE(5)	///<打开驱动失败
#define kHccAppUartDispStartTaskFailLine	HCC_MAKE_APP_UART_DISP_ERROR_LINE(6)	///<线程无法启动
#define kHccAppUartDispNotSupportLine	HCC_MAKE_APP_UART_DISP_ERROR_LINE(7)	///<功能不支持
#define kHccAppUartDispNotOpenLine	HCC_MAKE_APP_UART_DISP_ERROR_LINE(8)	///<串口未打开
#define kHccAppUartDispNvsBaudLine	HCC_MAKE_APP_UART_DISP_ERROR_LINE(9)	///<波特率获取失败
#define kHccAppUartDispNvsParityLine	HCC_MAKE_APP_UART_DISP_ERROR_LINE(10)	///<校验位获取失败
#define kHccAppUartDispNvsDispMaxLine	HCC_MAKE_APP_UART_DISP_ERROR_LINE(11)	///<分发对象已满

//旧版本适配补丁
#define kHccAppUartDispCodeSuccess kHccAppUartDispSuccess


#ifdef __cplusplus
}  // extern "C"
#endif

#endif // _HCC_ERROR_CODE_APP_UART_DISP_H_
/**
 * @
 */
